﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UploadSet.aspx.cs" Inherits="GreatB2C.Web.Manage.SystemSet.SiteInfo.UploadSet" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>上传文件配置</title>
    <link href="../../../App_Themes/AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/xtree.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="../../../Resource/Script/jquery-1.4.2.min.js"></script>

    <script src="../../../Resource/Script/jquery.validate.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $().ready(function() {
            // validate signup form on keyup and submit
            $("#form1").validate({
                rules: {
                    txtUploadFileMaxSize: {
                        required: true
                        , digits: true
                    },
                    txtUploadDir: {
                        required: true
                    }
                },
                messages: {
                    txtUploadFileMaxSize: {
                        required: "<font class='validatemsg'>* 请输入允许上传的最大文件大小</font>"
                        , digits: "<font class='validatemsg'>* 您输入的格式不正确，请输入整数</font>"
                    },
                    txtUploadDir: {
                        required: "<font class='validatemsg'>* 请输入网站上传目录</font>"
                    }
                }
            });

        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="2" class="spacingtitle">
                <strong>上传文件配置</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" width="30%">
                <strong>是否允许上传文件：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlEnableUploadFiles" RepeatLayout="Flow" RepeatDirection="Horizontal"
                    runat="server">
                    <asp:ListItem Text="否" Value="0"></asp:ListItem>
                    <asp:ListItem Text="是" Value="1"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>允许上传的最大文件大小：</strong>
                <br />
                <span style="color: Blue">内容模型里的上传大小按照各字段的设置为准 </span>
            </td>
            <td>
                <asp:TextBox ID="txtUploadFileMaxSize" Text="1024" runat="server" MaxLength="12"
                    CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';"
                    onblur="this.style.backgroundColor='';"></asp:TextBox>
                KB&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: Blue">提示：1 KB = 1024 Byte，1 MB = 1024
                    KB<asp:RangeValidator ID="ValgMaxFileSize" runat="server" ControlToValidate="txtUploadFileMaxSize"
                        ErrorMessage="请输入整数" MaximumValue="2147483647" MinimumValue="0" SetFocusOnError="True"
                        Type="Integer"></asp:RangeValidator></span>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站上传目录：</strong><br />
            </td>
            <td>
                <asp:TextBox ID="txtUploadDir" Text="upload" MaxLength="20" runat="server" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtUploadDir"
                    ErrorMessage="网站上传目录不能为空"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator12" runat="server"
                    ControlToValidate="txtUploadDir" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>允许上传的文件类型：</strong><br />
                <span style="color: Blue">多种文件类型之间以“|”分隔，当其他没有设置时按照此设置</span>
            </td>
            <td>
                <asp:TextBox ID="txtUploadFileExts" Text="gif|jpg|jpeg|bmp|png|rar" runat="server"
                    CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';"
                    onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUploadFileExts"
                    ErrorMessage="允许上传的文件类型不能为空"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>上传文件的保存目录规则：</strong>
                <br />
                <span style="color: Red">可用变量： </span>
                <br />
                <span style="color: Blue">{$RootDir}：一级栏目目录、{$Year}：年份<br />
                    {$NodeDir}：当前栏目目录、{$Month}：月份<br />
                    {$NodeIdentifier}：栏目标识符、{$Day}：日期<br />
                    {$ParentDir}：当前栏目的父目录、{$FileType}：文件类型</span>
            </td>
            <td>
                <asp:DropDownList ID="ddlUploadFilePathRule" runat="server">
                    <asp:ListItem Value="{$FileType}/{$Year}{$Month}" Text="{$FileType}/{$Year}{$Month}"></asp:ListItem>
                    <asp:ListItem Value="{$FileType}/{$Year}/{$Month}" Text="{$FileType}/{$Year}/{$Month}"></asp:ListItem>
                    <asp:ListItem Value="{$FileType}/{$NodeDir}/{$Year}/{$Month}" Text="{$FileType}/{$NodeDir}/{$Year}/{$Month}"></asp:ListItem>
                    <asp:ListItem Value="{$RootDir}/{$Year}/{$Month}" Text="{$RootDir}/{$Year}/{$Month}"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>上传文件名保存规则：</strong>
                <br />
                <span style="color: Blue">内容模型里的上传按照各字段的设置为准 </span>
                <br />
                <span style="color: Red">可用变量： </span>
                <br />
                <span style="color: Blue">{$Year}：年份、{$Month}：月份<br />
                    {$Day}：日期、{$Hour}：小时<br />
                    {$Minute}：分钟、{$Second}：秒<br />
                    {$Origin}：原文件名、{$Random}：随机数</span>
            </td>
            <td>
                <asp:DropDownList ID="ddlFileNameRule" runat="server">
                    <asp:ListItem Text="{$Random}" Value="{$Random}"></asp:ListItem>
                    <asp:ListItem Text="{$Year}{$Month}{$Day}{$Hour}{$Minute}{$Second}" Value="{$Year}{$Month}{$Day}{$Hour}{$Minute}{$Second}"></asp:ListItem>
                    <asp:ListItem Text="{$Hour}{$Minute}{$Second}" Value="{$Hour}{$Minute}{$Second}"></asp:ListItem>
                    <asp:ListItem Text="{$Origin}" Value="{$Origin}"></asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlFileNameRule"
                    ErrorMessage="文件名只能以字母、数字、下划线及可用变量组成，不能为空"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>广告上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtAdzoneFileType" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtAdzoneFilePath" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtAdzoneFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>作者上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtAuthorFileType" runat="server" MaxLength="255" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtAuthorFilePath" runat="server" MaxLength="255" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtAuthorFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>来源上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtSourceFileType" runat="server" MaxLength="255" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtSourceFilePath" runat="server" MaxLength="20" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtSourceFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>用户上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtUserFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtUserFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" ControlToValidate="txtUserFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>品牌上传配置：</strong>
            </td>
            <td>
                类型：<asp:TextBox ID="txtTrademarkFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtTrademarkFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtTrademarkFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>厂商上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtProducerFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtProducerFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtProducerFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>商品缩略图和清晰图上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtShopFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtShopFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtShopFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>商品样式上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtProductstyleFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtProductstyleFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator10" runat="server"
                    ControlToValidate="txtProductstyleFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>多图商品上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtProductmultiplephotoFileType" runat="server" MaxLength="100"
                    CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';"
                    onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtProductmultiplephotoFilePath" runat="server" MaxLength="100"
                    CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';"
                    onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server"
                    ControlToValidate="txtProductmultiplephotoFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>邮件附件上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtEmailAttachFileType" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtEmailAttachFilePath" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator14" runat="server"
                    ControlToValidate="txtEmailAttachFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>短消息附件上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtMessageAttachFileType" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtMessageAttachFilePath" runat="server" MaxLength="50" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator13" runat="server"
                    ControlToValidate="txtMessageAttachFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>博客上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtBlogFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtBlogFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator15" runat="server"
                    ControlToValidate="txtBlogFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>任务上传配置：</strong><br />
            </td>
            <td>
                类型：<asp:TextBox ID="txtTaskFileType" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox><br />
                目录：<asp:TextBox ID="txtTaskFilePath" runat="server" MaxLength="100" CssClass="inputtext"
                    Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator18" runat="server"
                    ControlToValidate="txtTaskFilePath" Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成"
                    SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbgbottom">
            <td colspan="2">
                <asp:Button ID="BtnSubmit" runat="server" Text="保存设置[S]" class="btnstyle_blue" Style="width: 90px;"
                    AccessKey="S" onmouseover="this.className='btnstyle_blue_over'" onmouseout="this.className='btnstyle_blue'"
                    OnClick="BtnSubmit_Click" />&nbsp;&nbsp;
                <input type="reset" name="ClearSiteInfo" value="重 填[R]" class="btnstyle_blue" id="btnSiteInfoReset"
                    accesskey="R" style="width: 70px;" runat="server" onmouseover="this.className='btnstyle_blue_over'"
                    onmouseout="this.className='btnstyle_blue'" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
